import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class ObjectMapperDemo {


    public static void main(String[] args) {
        String jsonString ="{\"brand\":\"XIAOMI\",\"model\":\"su7\",\"city\":\"Guagnzhou\",\"year\":2025}";

        ObjectMapper mapper = new ObjectMapper();
        try{
            Car myCar = mapper.readValue(jsonString, Car.class);
            System.out.println(myCar.toString());
        }catch (JsonProcessingException e)
        {
            throw new RuntimeException(e);
        }

    }


}